/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package agenda;
import java.util.*;
import org.jdom.*;
import org.jdom.input.*;
import org.jdom.output.*;
/**
 *
 * @author josue
 */
public class cargaContacto {

      public static void main(String args[]){
        try{
            SAXBuilder builder=new SAXBuilder(false);
            Document doc=builder.build("contactos.xml");
            Element raiz=doc.getRootElement();
            List nombres=raiz.getChildren("Nombre");
            for(int i=0;i<nombres.size();i++){
                System.out.println(i);
                System.out.println((String)nombres.get(i));
        }
        }
        catch(Exception e){}


    }


}
